package com.youjia.controller;

import com.youjia.pojo.ItemShopping;
import com.youjia.service.ItemShoppingService;
import com.youjia.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/itemShopping")
public class ItemShoppingController {
    @Autowired
    private ItemShoppingService itemShoppingService;
    @GetMapping("/getItemShopping/{userId}")
    public SysResult getItemShopping(@PathVariable Integer userId){
        List<ItemShopping> itemShoppingList = itemShoppingService.getItemShoppingList(userId);
        return SysResult.success(itemShoppingList);
    }
   /* @PutMapping("/updateShopping")
    public SysResult updateShopping(){

    }*/
}
